<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>选择器练习1</title>
    <style>
      /*任意选择器*/
      * {
        border: 1px solid dodgerblue;
      }
      /*属性选择器*/
      input[type='text'] {
        background: green;
      }
      input[type='password']{
        background-color: pink; /*背景颜色*/
      }
      /*分组选择器*/
      h1, #p1, .c1 {
        background-color: red;
      }
      /*id选择器*/
      #p1 {
        color: white;
      }
      /*类选择器*/
      .c1 {
        color: blue;
      }
    </style>
</head>
<body>
  <input type="text">
  <input type="password">
  <h1>张亚峰</h1>
  <p id="p1">冰箱</p>
  <p>洗衣机</p>
  <p class="c1">电视</p>
  <div>香蕉</div>
  <div class="c1">苹果</div>
</body>
</html>